>get.sql;
for rs in `cat table.1`;do
psql "dbname=____ host=_____ port=______ user=______ password=________" <<eof |tail -n +4|head -n -1|sed 's/| //g'|sed s'/$/,/g' >temp.sql
\d ____.$rs
eof
str=`cat temp.sql`;disc=`head -n 2 temp.sql|tail -n 1|awk '{print $1}'`;str="create table $rs("`echo $str|sed "s/,\$/\)partition by hash\($disc\)partitions default;/g"`;
echo $str|sed 's/numeric ,/numeric(26,6) ,/g'|sed 's/text/varchar/g'|sed 's/numeric(100,5)/numeric(38,5)/g' >>get.sql
done
